﻿
@{
    Layout = null;
}
@using MVC_ACE.Areas.RollCall.Models
<!DOCTYPE html>

<html>
<head>
    <link href="~/scripts/Bootstrap/bootstrap.css" rel="stylesheet" />
    <meta name="viewport" content="width=device-width" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <script src="~/scripts/Bootstrap/js/jquery-2.0.3.min.js"></script>
    <title>xzdetail</title>
    <style>
        .width1 {
            width: 80%;
            font-size: 25px;
            background-color: #33a3dc;
        }

        .color {
            font-size: 25px;
            width: 80%;
        }

        .table th, .table td {
            text-align: center;
            vertical-align: middle !important;
            border: 1px solid #000 !important;
        }

        .btn-mycolor {
            background-color: #FFEBCD;
            border-color: #FFEBCD;
        }

        .mycolor {
            background-color: #FFEBCD;
        }

        .table-bordered th,
        .table-bordered td {
            border: 1px solid #000 !important;
        }

        .textcenter {
            text-align: center;
        }
    </style>
    <script>

        $(function () {
            $("#up").click(
              function () {
                  var bu = $("#SearchDate").attr("bu"); 
                  var date = $("#SearchDate").attr("text");
                 // alert(date);
                  date = date - 1;
                  $("#SearchDate").attr("text", date);
                  data=bu+","+date
                  window.location.href = "/RollCall/details/qqdetail/" + data;
              })

            $("#last").click(
            function () {
                var bu = $("#SearchDate").attr("bu");
                var date = $("#SearchDate").attr("text");
                date = parseInt(date) + 1;
                $("#SearchDate").attr("text", date);
                data = bu + "," + date
                window.location.href = "/RollCall/details/qqdetail/" + data;
               
            })
            $("#submit").click(
           function () {
               var date = $("#RData").attr("values");
           // alert(date)
              // $("#RData").attr("values", date);
               window.location.href = "/RollCall/details/xzdetail/" + date;
           })


            $("#return").click(
            function () {
                var id1 = $("#SearchDate").attr("text");
                var UserBU1 = $("#SearchDate").attr("bu");
                data = UserBU1 + "," + id1;
                window.location.href = "/RollCall/details/BUdetail/" + data;
         })

        })

        function checkNum(obj) {

            if (isNaN(obj.value)) {
                obj.value = "";
            }

        }




    </script>
</head>
<body>
    <div class="container-fluid">
        <div class="row textcenter">
            <Label ID="Label1" Text="Test_Test" class="col-xs-12 textcenter" Font-Size="X-Large"> @ViewData["Date"]</Label>
        </div>

        <table id="HolderTable" class="table table-bordered table-condensed">
            <tr class="mycolor">
                <td>工號</td>
                <td>姓名</td>
                <td>線名</td>
                <td>班別</td>
                <td>缺勤原因</td>
                <td>中途變動</td>
                <td>中途變動原因</td>
            </tr>

            @*@for (int a = 0; a < 10; a++)*@
            @foreach (qqdetail a in (List<qqdetail>)ViewData["list_qqdetail"])
            {
                <tr>
                    <td class="mycolor">@a.ID</td>
                    <td class="mycolor">@a.Name</td>
                    <td class="mycolor">@a.Linename</td>
                    <td class="mycolor">@a.Class</td>
                    <td>@a.reason</td>
                    <td>@a.ZTbd</td>
                    <td>@a.ZTreason</td>

                </tr>
            }


        </table>


        @*<div class="row">
            <form method="post" action="/details/qqdetail" class="form-horizontal">
                <fieldset>
                    <div class="form-group">
                        <table style="text-align:center;width:100%">
                            <tr wit>
                                <td><label class="col-ml-2 control-label">按輸入年月日期查詢</label></td>
                                <td><input type="text" maxlength="8" placeholder="輸入日期20180101" class="form-control" id="RData" name="RData" onkeyup="checkNum(this);" /></td>
                                <td><div class="col-ml-4"> <button type="submit" id="submit" class="btn btn-sm btn-default">搜索Search</button></div></td>
                            </tr>
                        </table>
                    </div>
                </fieldset>
            </form>

        </div>*@
    </div>

    <label id="SearchDate" text="@ViewData["date_int"]" bu="@ViewData["bu"]"></label>
    <div class="row">
        <table style="width:100%;text-align:center">
            <tr>
                <td><input type="button" ID="up" value="上一天" class="btn" @*style="float:left"*@ /></td>
                <td><input type="button" ID="return" value="返回" class="btn " />     </td>
                <td><input type="button" ID="last" value="下一天" @*style="float:right"*@ class="btn" /></td>
            </tr>
        </table>

    </div>

</body>
</html>
